package com.br.nninn.tests;


public class JSONTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		String t = "<p><strong>Location.</strong> <br />This <strong>Seattle</strong> hotel is close to <strong>Pacific Place</strong>, <strong>Washington State Convention & Trade Center</strong>, and <strong>Westlake";
		String x = t.substring(t.indexOf("<br />") + 6, t.length());
		System.out.println(x);
		
		
//		try {
//
//			String json = "{'HotelListResponse':{'HotelList':{'HotelSummary':" +
//					"[{'address1':'515 Madison Street','hotelId':114630,'city':'Seattle','confidenceRating':90,'propertyCategory':1,'postalCode':98104,'name':'Renaissance Seattle - a Marriott family hotel','hotelRating':4,'longitude':-122.33164,'rateCurrencyCode':'USD','proximityDistance':0.036473572,'locationDescription':'Near Seattle Public Library','deepLink':'http://travel.ian.com/index.jsp?pageName=hotAvail&amp;cid=55505&amp;hotelID=114630&amp;mode=2&amp;numberOfRooms=1&amp;room-0-adult-total=2&amp;showInfo=true&amp;locale=en_US&amp;currencyCode=USD','countryCode':'US','@order':'0','thumbNailUrl':'/hotels/1000000/20000/14500/14405/14405_85_t.jpg','proximityUnit':'MI','tripAdvisorRating':4,'lowRate':158.9997,'shortDescription':'&lt;p&gt;&lt;b&gt;Location. &lt;/b&gt; &lt;br /&gt;Located in central Seattle, Renaissance Seattle - a Marriott family hotel is a business-friendly hotel within walking distance of Seattle Public Library, Washington State','highRate':330,'airportCode':'SEA','stateProvinceCode':'WA','latitude':47.60667,'hotelInDestination':true,'amenityMask':16839115}," +
//					"{'address1':'1100 5th Ave','hotelId':130132,'city':'Seattle','confidenceRating':75,'propertyCategory':1,'postalCode':98101,'name':'Hotel Vintage Park, a Kimpton Hotel','hotelRating':4,'longitude':-122.33246,'rateCurrencyCode':'USD','proximityDistance':0.08088669,'locationDescription':'Near Seattle Public Library','deepLink':'http://travel.ian.com/index.jsp?pageName=hotAvail&amp;cid=55505&amp;hotelID=130132&amp;mode=2&amp;numberOfRooms=1&amp;room-0-adult-total=2&amp;showInfo=true&amp;locale=en_US&amp;currencyCode=USD','countryCode':'US','@order':'1','thumbNailUrl':'/hotels/1000000/30000/25100/25015/25015_116_t.jpg','proximityUnit':'MI','tripAdvisorRating':4.5,'lowRate':149.3698,'shortDescription':'&lt;p&gt;&lt;b&gt;Location. &lt;/b&gt; &lt;br /&gt;Located in central Seattle, Hotel Vintage Park, a Kimpton Hotel is a business-friendly hotel within walking distance of Seattle Public Library, Washington State Convention','highRate':329.11,'airportCode':'SEA','stateProvinceCode':'WA','latitude':47.60733,'hotelInDestination':true,'amenityMask':8372554}," +
//					"{'address1':'400 Spring St','hotelId':132684,'city':'Seattle','confidenceRating':66,'propertyCategory':1,'postalCode':98104,'name':'Executive Hotel Pacific','hotelRating':3,'longitude':-122.33349,'rateCurrencyCode':'USD','proximityDistance':0.08113807,'locationDescription':'Near Seattle Public Library','deepLink':'http://travel.ian.com/index.jsp?pageName=hotAvail&amp;cid=55505&amp;hotelID=132684&amp;mode=2&amp;numberOfRooms=1&amp;room-0-adult-total=2&amp;showInfo=true&amp;locale=en_US&amp;currencyCode=USD','countryCode':'US','@order':'2','thumbNailUrl':'/hotels/1000000/30000/23800/23764/23764_33_t.jpg','proximityUnit':'MI','tripAdvisorRating':3.5,'lowRate':89,'shortDescription':'&lt;p&gt;&lt;b&gt;Location. &lt;/b&gt; &lt;br /&gt;Located in central Seattle, Executive Hotel Pacific is a business-friendly hotel within walking distance of Seattle Public Library, Washington State Convention &amp; Trade','highRate':279.0213,'airportCode':'SEA','stateProvinceCode':'WA','latitude':47.60681,'hotelInDestination':true,'amenityMask':6832459}," +
//					"{'address1':'1101 4th Ave','hotelId':132138,'city':'Seattle','confidenceRating':40,'propertyCategory':1,'postalCode':98101,'name':'Hotel Monaco Seattle, a Kimpton Hotel','hotelRating':4,'longitude':-122.33358,'rateCurrencyCode':'USD','proximityDistance':0.08507447,'locationDescription':'Near Seattle Public Library','deepLink':'http://travel.ian.com/index.jsp?pageName=hotAvail&amp;cid=55505&amp;hotelID=132138&amp;mode=2&amp;numberOfRooms=1&amp;room-0-adult-total=2&amp;showInfo=true&amp;locale=en_US&amp;currencyCode=USD','countryCode':'US','@order':'3','thumbNailUrl':'/hotels/1000000/70000/62800/62800/62800_38_t.jpg','proximityUnit':'MI','tripAdvisorRating':4.5,'lowRate':179,'shortDescription':'&lt;p&gt;&lt;b&gt;Location. &lt;/b&gt; &lt;br /&gt;Located in central Seattle, Hotel Monaco Seattle, a Kimpton Hotel is a business-friendly hotel within walking distance of Seattle Public Library, Washington State','highRate':400,'airportCode':'SEA','stateProvinceCode':'WA','latitude':47.60682,'hotelInDestination':true,'amenityMask':49482}," +
//					"{'address1':'1112 4th Ave','hotelId':213497,'city':'Seattle','confidenceRating':10,'propertyCategory':1,'postalCode':98101,'name':'W Seattle','hotelRating':4,'longitude':-122.33361,'rateCurrencyCode':'USD','proximityDistance':0.08846978,'locationDescription':'Near Seattle Public Library','deepLink':'http://travel.ian.com/index.jsp?pageName=hotAvail&amp;cid=55505&amp;hotelID=213497&amp;mode=2&amp;numberOfRooms=1&amp;room-0-adult-total=2&amp;showInfo=true&amp;locale=en_US&amp;currencyCode=USD','countryCode':'US','@order':'4','thumbNailUrl':'/hotels/1000000/290000/284400/284304/284304_50_t.jpg','proximityUnit':'MI','tripAdvisorRating':4,'lowRate':236.9959,'shortDescription':'&lt;p&gt;&lt;b&gt;Location. &lt;/b&gt; &lt;br /&gt;Located in central Seattle, W Seattle is a business-friendly hotel within walking distance of Seattle Public Library, Washington State Convention &amp; Trade Center, and','highRate':571.95,'airportCode':'SEA','stateProvinceCode':'WA','latitude':47.60688,'hotelInDestination':true,'amenityMask':7848267}" +
//					"],'@size':'5','@activePropertyCount':'5'},'customerSessionId':'0ABAA871-8861-9B91-3362-49F3D889072F','moreResultsAvailable':false,'numberOfRoomsRequested':0}}";
//
//			
//			
//			JSONObject obj = new JSONObject(json);
//			JSONObject response = obj.getJSONObject("HotelListResponse");
//			JSONObject list = response.getJSONObject("HotelList");
//			JSONArray summary = list.getJSONArray("HotelSummary");
//			
//			
//			System.out.println(summary.get(0));
//			System.out.println(summary.get(1));
//			
//			String[] a = summary.get(0).toString().split(",");
//			System.out.println("======================");
//			for (int i = 0; i < a.length; i++) {
//				System.out.println(a[i]);
//			}
//		
//		
//		} catch (JSONException e) {
//			e.printStackTrace();
//		}
		
		
	}

}
